import pandas as pd
from pyecharts import options as opts
from pyecharts.charts import Pie
from pyecharts.globals import ThemeType
df = pd.read_excel('某店铺促销方式分析.xlsx')
total = df['购买人数'].sum()
tree=[]
for i in range(len(df.index)):
    dic = {}
    dic['name']=df['促销方式'][i]